package com.hopu.v1.pojo.classes;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.hopu.v1.pojo.common.Update;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

/**
 * 学生课程作业记录表
 * @TableName t_course_homework_record
 */
@TableName(value ="t_course_homework_record")
@Data
public class CourseHomeworkRecord implements Serializable {
    /**
     * 学生课程作业记录id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 课程作业id
     */
    private Long homeworkId;

    /**
     * 学生id
     */
    private Long studentId;

    /**
     * 学生答案
     */
    private String studentAnswer;

    /**
     * 判断正确
     */
    @TableField(value = "correct_judgment")
    @NotNull(message = "判断不能为空",groups = Update.class)
    private Long correctJudgment;

    /**
     * 批改状态
     */
    private Long correctConition;

    /**
     * 老师评语
     */
    @TableField(value = "teacher_comments")
    @Length(message = "评论字数超出限制", max = 255, groups = Update.class)
    @NotNull(message = "评语不能为空",groups = Update.class)
    private String teacherComments;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Long submittedPeoples;
    @TableField(exist = false)
    private Long unSubmittedPeoples;
}